Carbon


SetWindowModified

Header: MacWindows.h Carbon status: Supported

Sets the modification state of the specified window.

OSStatus SetWindowModified (
    WindowRef window, 
    Boolean modified
);
window

A pointer to the window whose modification state is to be set.

modified

true if the content of the window has been modified; otherwise false.

function result

A result code.

DISCUSSION

Your application can use the functions SetWindowModified and IsWindowModified instead of maintaining its own separate record of the modification state of the content of a window.

Your application should distinguish between the modification state of the window and the modification state of the window’s contents, typically a document. The modification state of the window contents are what should affect SetWindowModified. For example, in the case of a word processing document, you call SetWindowModified (passing true in the modified parameter) whenever the user types new characters into the document. However, you do not call SetWindowModified when the user moves the window, because that change does not affect the document contents. If you need to track whether the window position has changed, you need to do this with your own flag.

VERSION NOTES

This function is available with Mac OS 8.5 and later.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when WindowsLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by WindowsLib 8.5 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)